package com.base.monitor.admin.controller.biz.cfg;

import com.base.monitor.framework.annotation.RefuseResponseResult;
import com.base.monitor.framework.annotation.ResponseResult;
import com.base.monitor.framework.result.PageResult;
import com.base.monitor.model.model.biz.cfg.crierita.IndicatorCriteria;
import com.base.monitor.model.model.biz.cfg.entity.Indicator;
import com.base.monitor.module.biz.service.cfg.IndicatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/cfg/indicator")
@ResponseResult
public class IndicatorController {

    @Autowired
    private IndicatorService indicatorService;

    /**
     * 分页条件查询指标信息
     * @param indicatorCriteria 查询条件
     * @return
     */
    @GetMapping
    @RefuseResponseResult
    public PageResult<Indicator> page(IndicatorCriteria indicatorCriteria) {
        return indicatorService.page(indicatorCriteria);
    }
}
